const { Sequelize, sequelize } = require('./sequelize');

const ExperimentCourse = sequelize.define('ExperimentCourse', {
  ecId: {
    type: Sequelize.INTEGER,
    allowNull: false,
    primaryKey: true,
    unique: true,
  },
  ecTitle: {
    type: Sequelize.STRING,
    allowNull: false,
  },
  ecType: {
    type: Sequelize.STRING,
    allowNull: false,
  },
  ecDifficultyDegree: {
    type: Sequelize.FLOAT,
    allowNull: false,
  },
  ecHours: {
    type: Sequelize.INTEGER,
    allowNull: false,
  },
  arrangeWeekly: {
    type: Sequelize.INTEGER,
  },
  cId: {
    type: Sequelize.INTEGER,
    allowNull: false,
    // references: {
    //   model: Course,
    //   key: 'cId',
    // },
  },
  totalNumber: {
    type: Sequelize.INTEGER,
  },
  taughtClass: {
    type: Sequelize.STRING,
  },
  tIds: {
    type: Sequelize.STRING,
  },
  ecIsArranged: {
    type: Sequelize.STRING,
  },
}, {
  modelName: 'ExperimentCourse',
  tableName: 'experiment_course',
  timestamps: false,
});

module.exports = {
  ExperimentCourse
};
